package cn.cau.service.impl;

import cn.cau.dao.AuditingMidInfoDao;
import cn.cau.dao.NonEnumDao;
import cn.cau.entity.AuditingMidInfo;
import cn.cau.entity.AuditingUtils;
import cn.cau.entity.NonEnum;
import cn.cau.service.AuditingMidService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AuditingMidServiceImpl implements AuditingMidService {

    @Autowired
    NonEnumDao nonEnumDao;

    @Autowired
    AuditingMidInfoDao auditingMidInfoDao;

    @Override
    public List<NonEnum> findAllNoneEnumByCodeId(int codeId) {
        return nonEnumDao.findAllNoneEnumByCodeId(codeId);
    }

    @Override
    public int AddNonEunmInfo(AuditingMidInfo auditingMidInfo) {
        return auditingMidInfoDao.addInfo(auditingMidInfo);
    }

    @Override
    public List<AuditingMidInfo> findAuditingMidInfoByCodeId(int id) {
        return auditingMidInfoDao.findMidInfoByCodeId(id);
    }

    @Override
    public List<AuditingMidInfo> findAuditingMidInfoByCodeIdAndSegName(AuditingUtils auditingUtils) {
        return auditingMidInfoDao.findMidInfoByCodeIdAndName(auditingUtils);
    }

    @Override
    public int updateInfo(AuditingMidInfo auditingMidInfo) {
        return auditingMidInfoDao.updateInfo(auditingMidInfo);
    }


}

